import Vue from 'vue'
import VueRouter from 'vue-router'

import home from '@/components/index.vue'
import detail from '@/components/views/detail.vue'
import search from '@/components/views/search.vue'
import category from '@/components/views/category.vue'
import history from '@/components/views/history.vue'
import console from '@/components/views/console.vue'
import vr from '@/components/views/vrPlayer.vue'
import testCK from '@/components/views/testCK.vue'
Vue.use(VueRouter);

const routers = [
    {
        path: '/home',
        component: home,
        meta:{
            title:"首页",
            keepAlive: true,
        }
    },
    {
        path:'/ck',
        component: testCK,
        meta:{
            title:"测试"
        }
    },
    {
        path:'/vr',
        component:vr,
        meta:{
            title:'vr'
        }
    },
    {
        path: '/detail',
        component: detail,
        meta:{
            title:"详情页面"
        }
    }, {
        path: '/search',
        component: search,
        meta:{
            title:"搜索"
        }
    }, {
        path:'/category',
        component: category,
        meta:{
            title:"频道"
        }
    },{
        path:'/history',
        component: history,
        meta:{
            title:"观看历史"
        }
    },
    {
        path:'/console',
        component: console,
        meta:{
            title:"我"
        }
    },
    {
        path: '/',
        redirect: "home"
    }
]

var router = new VueRouter({
    //mode:'history',
    routes: routers
})
export default router;